<div>
  <div style="overflow: auto;" class="GridView">
    <div style="overflow: auto;" class="GridView" id="SearchFilterListView">
      <div>
        <div style="" class="TitleBarView">
          <h1><?php echo $this->navText;?></h1>
        </div>
      </div>
      <div>
        <div style="overflow: auto;" class="SearchView SearchView ModelView ConfigurableMetadataView MetadataView" id="AccountsSearchView">
          <div class="wide form">
              <table>
                <colgroup>
                <col style="width:20%">
                <col style="width:30%">
                <col style="width:20%">
                <col style="width:30%">
                </colgroup>
                <tbody class="search-view-bottom-panel">
                  <tr>
                    <td colspan="4">
                        &nbsp;|&nbsp;
                    	<?php echo CHtml::link('新建帐户', array('index'))?>
                    </td>
                  </tr>
                </tbody>
              </table>
            </form>
          </div>
        </div>
      </div>
      <div>
        <div style="overflow: auto;" class="SecuredListView ListView ModelView ConfigurableMetadataView MetadataView" id="AccountsListView">
          <div class="view-toolbar"></div>
          <div id="list-view" class="cgrid-view">
            <table class="items">
              <thead>
                <tr>
                  <th id="list-view_c1" style="width:5%">用户名</th>
                  <th id="list-view_c2" style="width:5%">Email</th>
                  <th id="list-view_c3" style="width:5%">QQ</th>
                  <th id="list-view_c4" style="width:5%">上次登录时间</th>
                  <th id="list-view_c5" style="width:10%">上次登录Ip</th>
                  <th id="list-view_c6" style="width:30%">可否登录</th>
                  <th id="list-view_c8" class="button-column" style="width:20%;">操作</th>
                </tr>
              </thead>
              <tbody>
              	<?php if ($users==false) :?>
                <tr>
                  <td colspan="8"><span class="empty">无记录</span></td>
                </tr>
                <?php else :?>
                <?php foreach($users as $user) :?>
	                <tr>
	                  <td><?php echo CHtml::encode($user['userName']);?></td>
	                  <td><?php echo CHtml::encode($user['email']);?></td>
	                  <td><?php echo CHtml::encode($user['qq'])?></td>
	                  <td><?php echo date('Y-m-d H:i:s', $user['lastLoginTime']);?></td>
	                  <td><?php echo $user['lastIp'];?></td>
	                  <td><?php echo $user['isLogin']==1? 'Y' : 'N';?></td>
	                  <td>
	                  <?php if ($user['userId']==1 || $user['userName']==Yii::app()->user->name) :?>
	                  &nbsp;
	                  <?php else :?>
		                  <?php echo CHtml::link('设置权限', array('account/set', 'userId'=>$user['userId']));?>
		                   | 
		                  <?php echo CHtml::link('禁止登录', array('account/disabled', 'userId'=>$user['userId']));?>
		              <?php endif; ?>
	                  </td>
	                </tr>
	            <?php endforeach; ?>
                <?php endif;?>
                
              </tbody>
            </table>
            <div title="/index.php?r=accounts/default" style="display:none" class="keys"></div>
          </div>
          <input type="hidden" id="list-view-selectedIds" name="list-view-selectedIds" value="">
          <input type="hidden" id="list-view-selectAll" name="list-view-selectAll" value="">
        </div>
      </div>
    </div>
  </div>
</div>
